<?php
        session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

	<title>Login Form</title>
	<link href="css/auth.css" rel="stylesheet" type="text/css" />

</head>
<body>


		<div style="position: absolute; bottom: 20px; right: 20px;" class="button" onclick="location.href='register-form.php'">I'm new!</div>

	<form id="login" name="login" class="login" method="post" action="login-exec.php">

            <label>Username:</label>
			<input type="text" name="username" />
            <label>Password:</label>
			<input type="password" name="password"  />
			
			<input id="doLogin" type="submit" value="Login" name="submit" class="submit" />
    
    </form>

<?php
   
 
if( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) >0 ) {

        echo '<div class="error">';

        foreach($_SESSION['ERRMSG_ARR'] as $msg) {
		#echo '<li>',$msg,'</li>'; 
            echo $msg.'<br />';
        }

        echo '</div>';
                unset($_SESSION['ERRMSG_ARR']);
        
        }

?>

</body>
</html>
